<template>
  <!-- imgUrl 为绑定的字段   @getUrl方法为绑定的值 赋值  limit 为上传限制的个数    accept为上传限制格式 -->
  <Uploadimg
    :imgUrl="userAuthForm.service.idCardFront"
    @getUrl="getIdCardFrontUrl"
    :limit="1"
    accept=".png,.jpg"
  ></Uploadimg>
</template>
  <script lang="ts" setup>
import { ref, reactive, watch } from "vue";
import Uploadimg from "@/components/Upload/upImage.vue";
//上传参数
const userAuthForm = reactive({
  service: {
    idCardFront: "",
  },
});
// @getUrl方法
const getIdCardFrontUrl = (url) => {
  userAuthForm.service.idCardFront = url;
};
</script>
  
  